package com.zezheng.qian.project.base.service.impl;

import java.util.List;
import com.zezheng.qian.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zezheng.qian.project.base.mapper.BUserMapper;
import com.zezheng.qian.project.base.domain.BUser;
import com.zezheng.qian.project.base.service.IBUserService;

/**
 * 安心签用户Service业务层处理
 *
 * @author cuijie
 * @date 2023-10-23
 */
@Service
public class BUserServiceImpl implements IBUserService
{
    @Autowired
    private BUserMapper bUserMapper;

    /**
     * 查询安心签用户
     *
     * @param id 安心签用户主键
     * @return 安心签用户
     */
    @Override
    public BUser selectBUserById(Long id)
    {
        return bUserMapper.selectBUserById(id);
    }

    /**
     * 查询安心签用户列表
     *
     * @param bUser 安心签用户
     * @return 安心签用户
     */
    @Override
    public List<BUser> selectBUserList(BUser bUser)
    {
        return bUserMapper.selectBUserList(bUser);
    }

    /**
     * 新增安心签用户
     *
     * @param bUser 安心签用户
     * @return 结果
     */
    @Override
    public int insertBUser(BUser bUser)
    {
        bUser.setCreateTime(DateUtils.getNowDate());
        return bUserMapper.insertBUser(bUser);
    }

    /**
     * 修改安心签用户
     *
     * @param bUser 安心签用户
     * @return 结果
     */
    @Override
    public int updateBUser(BUser bUser)
    {
        bUser.setUpdateTime(DateUtils.getNowDate());
        return bUserMapper.updateBUser(bUser);
    }

    /**
     * 批量删除安心签用户
     *
     * @param ids 需要删除的安心签用户主键
     * @return 结果
     */
    @Override
    public int deleteBUserByIds(Long[] ids)
    {
        return bUserMapper.deleteBUserByIds(ids);
    }

    /**
     * 删除安心签用户信息
     *
     * @param id 安心签用户主键
     * @return 结果
     */
    @Override
    public int deleteBUserById(Long id)
    {
        return bUserMapper.deleteBUserById(id);
    }
}
